<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		
        <script language='javascript' src='../js/scriptManager.js'>
        </script>
        <script language='javascript'>loadFiles("../");</script>
		<!--[if IE ]>
			<link rel="stylesheet" type="text/css" href="../css/jie_ie.css">
		<![endif]-->
		<!--[if !IE ]><!-->
			<link rel="stylesheet" type="text/css" href="../css/jie.css">
		<!--<![endif]-->
		<title>Untitled Document</title>
	</head>
	<body>
	<input type="submit" >
		<div id = "abc" style="border: 2px solid #000000;width:800px; height: 500px;background-image:url('../img/123.bmp');" on></div>
		<input type="button" value="insert line" onclick="insertLine()"  >
		<input type="text" readonly="readonly" alt="3333"  disabled="true" value="insert line" onclick="insertLine()"  >
		<div onblur="alert('1111')" style="border: 2px solid #000000;display:inline-block;width:800px; height: 500px;" >1111</div>
		<script>
		function insertLine(){
				jg.insertRow();
		}
		function clickTest(ao){
//			alert(ao);
			this.setValue("123");
			//alert(ao.getValue());
		}
		function clickTest2(ao){
//			alert(ao);
			this.setValue("345");
			//alert(ao.getValue());
		}
		function clickTest3(ao){
//			alert(ao);
			alert(this.getValue());
			//alert(ao.getValue());
		}
		var jg = null;
			try{
				jg = new GridFace(document.getElementById("abc"), "700px", "400px");
				
				jg.setHeadersCount(3);
				jg.setFixedCount(2);
//				alert("setHeadersCount")
				var temp = new Array(
					{id:"123",title:new Array("abc","def","def"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "text",   defaultValue:"abdc1", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"},
					{id:"234",title:new Array("abc","dfg"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "text",         defaultValue:"abdc2", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"345",title:new Array("abc"),isEdit:false,isShow:true,width:"78px",emptyCheck:"",aligns:"",dateType: "text",              defaultValue:"abdc3", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"},
					{id:"456",title:new Array("abc","def"),isEdit:true,isShow:true,width:"96px",emptyCheck:"",aligns:"",dateType: "text",         defaultValue:"abdc4", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"},
					{id:"678",title:new Array("abc","def", "dfdf"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "list", defaultValue:"abdc5", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"789",title:new Array("abc","def", "sdf"),isEdit:false,isShow:true,width:"96px",emptyCheck:"",aligns:"",dateType: "text",       defaultValue:"abdc6", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"right"},
					{id:"456",title:new Array("abc","def1"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "text",        defaultValue:"abdc7", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"456",title:new Array("abc","def1"),isEdit:true,isShow:true,width:"69px",emptyCheck:"",aligns:"",dateType: "text",        defaultValue:"abdc8", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"456",title:new Array("abc","def1","def2"),isEdit:true,isShow:true,width:"205px",emptyCheck:"",aligns:"",dateType: "text",defaultValue:"abdc9", dateBgColor:"#eeeeee", dateForeColor:"#000000", dateFontFamily:"宋体", headBgColor:"#cccccc", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"}
/*
					
					{id:"123",title:new Array("abc","def","def"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "text",   defaultValue:"abdc1", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"},
					{id:"234",title:new Array("abc","dfg"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "text",         defaultValue:"abdc2", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"345",title:new Array("abc"),isEdit:false,isShow:true,width:"78px",emptyCheck:"",aligns:"",dateType: "text",              defaultValue:"abdc3", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"},
					{id:"456",title:new Array("abc","def"),isEdit:true,isShow:true,width:"96px",emptyCheck:"",aligns:"",dateType: "text",         defaultValue:"abdc4", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"},
					{id:"678",title:new Array("abc","def", "dfdf"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "list", defaultValue:"abdc5", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"789",title:new Array("abc","def1"),isEdit:false,isShow:true,width:"96px",emptyCheck:"",aligns:"",dateType: "text",       defaultValue:"abdc6", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"right"},
					{id:"456",title:new Array("abc","def1"),isEdit:true,isShow:true,width:"56px",emptyCheck:"",aligns:"",dateType: "text",        defaultValue:"abdc7", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"456",title:new Array("abc","def1"),isEdit:true,isShow:true,width:"69px",emptyCheck:"",aligns:"",dateType: "text",        defaultValue:"abdc8", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"left"},
					{id:"456",title:new Array("abc","def1","def2"),isEdit:true,isShow:true,width:"205px",emptyCheck:"",aligns:"",dateType: "text",defaultValue:"abdc9", dateForeColor:"#000000", dateFontFamily:"宋体", headForeColor:"#000000", headFontFamily:"宋体",aligns:"center"}
*/
				);
				jg.initGrid(temp);
				jg.getColById("678").regCombo({
					"123" : "abc1",
					"234" : "abc2",
					"345" : "abc3",
					"456" : "abc4"
				});
				jg.columns[3].appendListener("click", clickTest);
				jg.columns[5].appendListener("click", clickTest);
				jg.columns[5].appendListener(Properties.system.eventType["doubleclick"], clickTest3);
				jg.columns[6].appendListener("click", clickTest2);
			}catch(err){
				
				alert(err);
			}

		</script>
	</body>
</html>
